{include file='common/head.html'}

<div class="layui-body">

    <div class="layui-tab layui-tab-brief" lay-filter="tab">
        <ul class="layui-tab-title">

            <li class="layui-this" lay-id="t1"><a href="{url./admin/Edit/index}">模板管理</a></li>

            <li><a href="{url./admin/Edit/add}">添加</a></li>
            <li><a href="#" onclick="javascript:history.back(-1);">返回上一页</a></li>

        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th>目录[{$path}]</th>
                    </tr>
                    </thead>
                    <tbody>
                    {if([$pdir])}
                   
                    {/if}
                    {foreach $dirlist(key,value)}
                    <tr>
                        <td><img src="{APP_THEME_DIR}/images/dir.gif" height="20"><a
                                href="{url./admin/Edit/index}/dir/[value]" class="">[value]</a> 

                        </td>

                    </tr>
                    {/foreach}
                    {foreach $filelist(key,value)}
                    <tr>
                        <td><img src="{APP_THEME_DIR}/images/html.gif" height="20">[value]

                            <div style="float: right">
                                <a
                                        href="{url./admin}/Edit/edit/file/[value]"
                                        class="layui-btn layui-btn-xs">修改</a>
                                <a href="{url./admin}/Edit/del/file/[value]"
                                   onclick="return confirm(&quot;您确定要删除么？&quot;)"
                                   class="layui-btn layui-btn-xs layui-btn-danger" title="删除">删除</a>
                            </div>

                        </td>


                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>

<style>.placeHolder {
    border: dashed 2px gray;
}</style>
<script type="text/javascript" src="{APP_THEME_DIR}/js/jquery.dragsort-0.5.2.min.js"></script>
<script type="text/javascript">
    $("#pics_box").dragsort({
        dragSelector: "dl",
        dragSelectorExclude: "input,textarea,dd",
        dragBetween: false,
        dragEnd: saveOrder,
        placeHolderTemplate: "<dl class='placeHolder'><dt></dt></dl>"
    });

    function saveOrder() {
        var data = $("#pics_box dl dt img").map(function () {
            return $(this).data("url");
        }).get();
        $("input[name=pics]").val(data.join(","))
    };
</script>
<script type="text/javascript" src="{APP_THEME_DIR}/js/jscolor.js"></script>

{include file='common/ueditor.html'}
{include file='common/foot.html'}
